package Day13;

import java.io.*;

public class Text4 {
    public static void main(String[] args) throws IOException {
        /*//创建对象并关联本地文件
        FileReader file = new FileReader("Day_01/src/a.txt");
        //读取数据
      int ch;
      while(( ch = file.read()) != -1){
          System.out.print((char)ch);
      }
      //3释放资源
        file.close();*/


       /* FileReader file = new FileReader("Day_01/src/a.txt");
        int ch;
        while(( ch = file.read()) != -1){
            System.out.print((char)ch);
        }
        file.close();
        */

/*

        FileWriter file = new FileWriter("Day_01/src/a.txt",true);
        file.write("哈哈哈哈");
        file.close();
*/

        //创建对象，表示数据源

        File src = new File("D:\\aaaa\\src");
        File dest = new File("D:\\aaaa\\dest");

        copydir(src, dest);
    }

    //拷贝文件夹
    private static void copydir(File src, File dest){
        File[] files = src.listFiles();
        for(File file : files){
            if(file.isFile()){
                //判断文件，拷贝

            }else{
                //判断文件夹，递归
            }
        }
    }


}
